home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Games / NeXTmj / Source / GameInterface.cc < prev    next >
Text File  |  1991-03-18  |  2KB  |  130 lines

  1.  
  2. /* Generated by Interface Builder */
  3.  
  4. #import    "TileCountManager.h"
  5. #import    "GameCoordinator.h"
  6.  
  7. extern "Objective-C" {
  8. #import "GameInterface.h"
  9. }
  10.  
  11. extern "C" {
  12. #import    <assert.h>
  13. }
  14.  
  15.  
  16. @implementation GameInterface
  17.  
  18. - init {
  19.  
  20.     [ super init ];
  21.     
  22.     gameCoordinator        = NULL;
  23.     tileCountManager    = NULL;
  24.     
  25.     return self;
  26. }
  27.  
  28.  
  29. - free {
  30.  
  31.  
  32.     delete gameCoordinator;
  33.     delete tileCountManager;
  34.     
  35.     return [ super free ];
  36. }
  37.  
  38.  
  39. - appDidInit:sender {
  40.  
  41.  
  42.     assert( tileCountView );
  43.     assert( gameBoardView );
  44.     
  45.     tileCountManager = new TileCountManager( tileCountView );
  46.     gameCoordinator = new GameCoordinator( gameBoardView, tileCountManager );
  47.     
  48.     application_initialized = YES;
  49.     
  50.     [ tileCountView display ];
  51.     [ gameBoardView display ];
  52.  
  53.     return self;
  54. }
  55.  
  56.  
  57. - undoClick:sender {
  58.  
  59.  
  60.     (( GameCoordinator* )gameCoordinator )->undoClick();
  61.     
  62.     return self;
  63. }
  64.  
  65.  
  66. - helpClick:sender {
  67.  
  68.     (( GameCoordinator* )gameCoordinator )->helpClick();
  69.  
  70.     return self;
  71. }
  72.  
  73.  
  74. - againClick:sender {
  75.  
  76.  
  77.     (( GameCoordinator* )gameCoordinator )->againClick();
  78.  
  79.     return self;
  80. }
  81.  
  82. - newClick:sender {
  83.  
  84.  
  85.     (( GameCoordinator* )gameCoordinator )->newClick();
  86.  
  87.     return self;
  88. }
  89.  
  90.  
  91. - gameBoardDraw {
  92.  
  93.  
  94.     if( application_initialized )
  95.         (( GameCoordinator* )gameCoordinator )->drawImage();
  96.     
  97.     return self;
  98. }
  99.  
  100.  
  101. - tileCountDraw {
  102.  
  103.  
  104.     if( application_initialized )
  105.         (( TileCountManager* )tileCountManager )->drawImage();
  106.     
  107.     return self;
  108. }
  109.  
  110.  
  111. - click:( const NXPoint * )aPoint {
  112.  
  113.  
  114.     (( GameCoordinator* )gameCoordinator )->click( aPoint );
  115.     
  116.     return self;
  117. }
  118.  
  119.  
  120. - doubleClick:( const NXPoint * )aPoint {
  121.  
  122.  
  123.     (( GameCoordinator* )gameCoordinator )->doubleClick( aPoint );
  124.  
  125.     return self;
  126. }
  127.  
  128.  
  129. @end
  130.